Skip to content

})} },System.IObservable{System.Boolean})} )} ,System.IObservable{System.Boolean})}

CommandSignal(Func>) constructor

Defined in

Type: CommandSignal Namespace: ReactiveUI.Primitives.Signals Assembly: ReactiveUI.Primitives.Core.dll

Applies to

net10.0, net10.0, net10.0-desktop1.0, net10.0-desktop1.0, net10.0-browserwasm1.0, net10.0-browserwasm1.0, net9.0, net9.0, net9.0-desktop1.0, net9.0-desktop1.0, net9.0-browserwasm1.0, net9.0-browserwasm1.0, net8.0, net8.0, net8.0-ios17.5, net8.0-macos14.5, net8.0-macos14.5, net8.0-macos14.2, net8.0-macos14.2, net8.0-maccatalyst17.5, net8.0-maccatalyst17.5, net8.0-tvos17.2, net8.0-tvos17.2, net8.0-ios17.5, netstandard2.1, netstandard2.1, net481, net462, net462, net481

Overloads

  • 1. public CommandSignal(Func<CancellationToken, Task<TResult>> execute)
  • 2. public CommandSignal(Func<CancellationToken, Task<TResult>> execute, IObservable<bool>? canRun)
  • 3. public CommandSignal(Func<TResult> execute)
  • 4. public CommandSignal(Func<TResult> execute, IObservable<bool>? canRun)

1. Overload

public CommandSignal(Func<CancellationToken, Task<TResult>> execute)

View source

Summary: Initializes a new instance of the CommandSignal class.

Parameters

NameTypeDescription
executeFunc>The async operation to execute.

2. Overload

public CommandSignal(Func<CancellationToken, Task<TResult>> execute, IObservable<bool>? canRun)

View source

Summary: Initializes a new instance of the CommandSignal class.

Parameters

NameTypeDescription
executeFunc>The async operation to execute.
canRunIObservable?Gating signal. When null, execution is always allowed.

3. Overload

public CommandSignal(Func<TResult> execute)

View source

Summary: Initializes a new instance of the CommandSignal class.

Parameters

NameTypeDescription
executeFuncThe synchronous operation to execute.

4. Overload

public CommandSignal(Func<TResult> execute, IObservable<bool>? canRun)

View source

Summary: Initializes a new instance of the CommandSignal class.

Parameters

NameTypeDescription
executeFuncThe synchronous operation to execute.
canRunIObservable?Gating signal. When null, execution is always allowed.